package com.retail.proxy.mapper;

import com.retail.core.common.CommonMapper;
import com.retail.proxy.entity.vo.ProxyOrderAchieveVo;
import com.retail.proxy.entity.request.ProxyOrderAchieveRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* 业绩 Mapper
* @author Administrator
*/
@Mapper
public interface ProxyOrderAchieveMapper extends CommonMapper<ProxyOrderAchieveRequest,ProxyOrderAchieveVo> {
    ProxyOrderAchieveVo findAchieveByCategoryIdAndAchieveType(@Param("proxyCategoryId") Long proxyCategoryId, @Param("achieveType") int achieveType);

    ProxyOrderAchieveVo findAchieveByCategoryIdAndAchieveTypeAndMonth(@Param("proxyCategoryId")Long proxyCategoryId, @Param("achieveType") int achieveType, @Param("achieveMonth")Integer achieveMonth);
    ProxyOrderAchieveVo findAchieveByCategoryIdAndAchieveTypeAndYear(@Param("proxyCategoryId")Long proxyCategoryId, @Param("achieveType") int achieveType);

    Integer updateAcheive1Data(ProxyOrderAchieveRequest ache);

    Integer updateAcheive2Data(ProxyOrderAchieveRequest ache);

    List<ProxyOrderAchieveVo> findAllOrderAchieves();
    
}
